package com.template.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.template.entity.PostComment;
import com.template.result.PageBean;
import com.template.vo.PostVO;
import org.springframework.stereotype.Service;

import java.lang.reflect.InvocationTargetException;
import java.util.List;

@Service
public interface CommunityService {

    PageBean getPostList(Integer pageNo, Integer pageSize,Integer userId) throws JsonProcessingException;

    PageBean searchPosts(String keyword, Integer pageNo, Integer pageSize, Integer userId) throws JsonProcessingException;

    void addPost(PostVO postVO) throws JsonProcessingException;

    void isGood(Integer userId, Integer id);

    void isNotGood(Integer userId, Integer id);

    PostVO getPostInfo(Integer postId, Integer userId) throws InvocationTargetException, IllegalAccessException;

    void addPostComment(PostComment postComment);

    List<PostComment> getPostCommentList(Integer postId);
}
